package cn.ad.server.domain.ad;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

public class AdTemplate implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -6584098939308116665L;

	static final String VERSION = "0";
	static final String CACHE_NAME = "adtemplate";

	private int id;
	private String name;
	private String sampleUrl;
	private String description;
	private int status;
	private Date createTime;
	private Date updateTime;
	private List<AdTemplateSpec> adTemplateSpecs;
	
	public static String cacheKey(long id) {
		return new StringBuilder(CACHE_NAME).append(":").append(VERSION).append(":").append(id).toString();
	}

	public String toCacheKey() {
		return new StringBuilder(CACHE_NAME).append(":").append(VERSION).append(":").append(this.getId()).toString();
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSampleUrl() {
		return sampleUrl;
	}

	public void setSampleUrl(String sampleUrl) {
		this.sampleUrl = sampleUrl;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public List<AdTemplateSpec> getAdTemplateSpecs() {
		return adTemplateSpecs;
	}

	public void setAdTemplateSpecs(List<AdTemplateSpec> adTemplateSpecs) {
		this.adTemplateSpecs = adTemplateSpecs;
	}

}
